<?php
    /**
     * Created by PhpStorm.
     * User: zgh
     * Date: 2021-07-30
     * Time: 9:52
     */

    namespace app\api\controller;

    use app\api\service\LoginService;
    use app\common\controller\ApiController;

    use app\common\util\EncryptUtil;
    use hg\apidoc\annotation as Apidoc;
    use think\facade\Cache;
    use think\facade\Request;
    use think\Response;
    use think\response\Json;

    /**
     * @Apidoc\Title("基础示例")
     * @Apidoc\Group("base")
     * Class IndexController
     * @package app\api\controller
     */
    class IndexController extends ApiController
    {

        public function test()
        {$redis = redis();
            $redis = $redis->handler();
            //xy:user_token:bfb25ba4512311e1713a479670817f9c
//            dump($redis->del("xy:user_token:ef3dcaca364e237f89d211e1a1261ccf"));
//            dump($redis->keys("*"));
//            dump(Request::param());
            ///MDAwMDAwMDAwMJykbquap3V1
//            dump(EncryptUtil::Encrypt('root', LoginService::PASSWORD_SALT));
//            dump(CodeUtil::encodeID(1,5));
        }
    }